# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=malware-check-tool
pkgver=1.2
pkgrel=5
groups=('blackarch' 'blackarch-malware')
pkgdesc='Python script that detects malicious files via checking md5 hashes from an offline set or via the virustotal site. It has http proxy support and an update feature.'
arch=('any')
url='http://packetstormsecurity.com/files/93518/Malware-Check-Tool-1.2.html'
license=('custom:unknown')
depends=('python2')
source=("https://dl.packetstormsecurity.net/UNIX/scanners/malware_check_tool-$pkgver.zip")
sha512sums=('f38e88e6318f667a48d2fee9afb1afdbdc3eded9cb7c99bbacbbae22c6887a79fca362814b53d7b98ee7fbf41271d1896287fd8d98414d9c18b712e8aa5de2d3')

package() {
  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.txt

  rm README.txt

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/malware-check" << EOF
#!/bin/sh
exec python2 /usr/share/$pkgname/malware_check.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/malware-check"
}

